/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pt.mleiria.cipher;

/**
 *
 * @author manuel
 */
public abstract class Cipher {
    
    private byte[] plainText;
    private byte[] cipherText;
    AssymetricKey assymKey;
    SymmetricKey symKey;
    
    /**
     * 
     * @param assymKey 
     */
    public void setAssymKey(AssymetricKey assymKey) {
        this.assymKey = assymKey;
    }
    /**
     * 
     * @param symKey 
     */
    public void setSymKey(SymmetricKey symKey) {
        this.symKey = symKey;
    }
    /**
     * 
     */
    public abstract void encrypt();
    /**
     * 
     */
    public abstract void decrypt();
    /**
     * 
     * @return 
     */
    public byte[] getCipherText() {
        return cipherText;
    }
    /**
     * 
     * @param cipherText 
     */
    public void setCipherText(byte[] cipherText) {
        this.cipherText = cipherText;
    }
    /**
     * 
     * @param cipherText 
     */
    public void setCipherText(String cipherText) {
        this.cipherText = cipherText.getBytes();
    }
    /**
     * 
     * @return 
     */
    public byte[] getPlainText() {
        return plainText;
    }
    /**
     * 
     * @param plainText 
     */
    public void setPlainText(byte[] plainText) {
        this.plainText = plainText;
    }
    /**
     * 
     * @param plainText 
     */
    public void setPlainText(String plainText) {
        this.plainText = plainText.getBytes();
    }
    
    
            
            
    
}
